package com.aracky.system.model.entity;

import com.aracky.common.entitybase.BaseCommonEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author zzp
 * @since 2022-07-14 11:22:57
 */
@Getter
@Setter
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "用户信息表")
public class SysUser extends BaseCommonEntity {

    @ApiModelProperty("用户ID")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty("部门ID")
    @TableField("dept_id")
    private Long deptId;

    @ApiModelProperty("登录账号")
    @TableField("login_name")
    private String loginName;

    @ApiModelProperty("用户昵称")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty("用户类型（00系统用户 01注册用户）")
    @TableField("user_type")
    private String userType;

    @ApiModelProperty("用户邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("手机号码")
    @TableField("phonenumber")
    private String phonenumber;

    @ApiModelProperty("用户性别（0男 1女 2未知）")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty("头像路径")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("盐加密")
    @TableField("salt")
    private String salt;

    @ApiModelProperty("帐号状态（1正常 0停用）")
    @TableField("status")
    private Boolean status;

    @ApiModelProperty("删除标志（1代表存在 0代表删除）")
    @TableField("del_flag")
    private Boolean delFlag;

    @ApiModelProperty("最后登录IP")
    @TableField("login_ip")
    private String loginIp;

    @ApiModelProperty("最后登录时间")
    @TableField("login_date")
    private LocalDateTime loginDate;

    @ApiModelProperty("密码最后更新时间")
    @TableField("pwd_update_date")
    private Date pwdUpdateDate;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;


    @ApiModelProperty("微信用户id")
    @TableField("wx_user_id")
    private String wxUserId;

    @ApiModelProperty("入职时间")
    @TableField("entry_time")
    private LocalDate entryTime;
}
